home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Klingon BG App / Source / EventRoutines.h < prev    next >
Encoding:
Text File  |  1997-06-28  |  1.6 KB  |  61 lines  |  [TEXT/CWIE]

  1. // Source code for Klingon Clock.   Copyright (C) 1996-1997
  2. // Charles H. Hemstreet IV
  3. //
  4. // Started at MacHack 1996
  5. // Completed at MacHack 1997
  6. //
  7. // Best thanks to:
  8. // My wife Regie, son Chad and baby
  9. // Other thanks to Elden Wood and Bob Clark
  10. //
  11. // This code is distributed "as-is" and implies no warranty or guarantee.
  12.  
  13.  
  14. #ifndef __EVENTROUTINES__
  15. #define __EVENTROUTINES__
  16.  
  17. #ifndef __ASSERT__
  18. #include <Assert.h>
  19. #endif
  20.  
  21. #ifndef __APPLEEVENTS__
  22. #include <AppleEvents.h>
  23. #endif
  24.  
  25.  
  26. // DEFINES
  27. #define kGetTALKEvent 'KTLK'
  28. #define kTALKEventClass 'KTLK'
  29. #define kGetTalkFREQEvent 'KFRQ'
  30. #define kTalkFREQEventClass 'KFRQ'
  31.  
  32.  
  33.  
  34. // PROTOTYPES
  35. void             GrabAndDoEvent(void);
  36. void             DispatchEvent( EventRecord *macEvent);
  37. pascal OSErr     myHandleQUIT(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon);
  38. pascal OSErr     myHandleRUN(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon);
  39. pascal OSErr     myHandleTALK(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon);
  40. pascal OSErr    myHandleTalkFREQ(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon);
  41.  
  42. void     DoDeallocateEverything(void);
  43. short     DoInstallAEHandlers(void);
  44. short     DoRemoveAEHandlers(void);
  45. void     DoHandleQuitExtension(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon);
  46. void     DoHandleTalkExtension(AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon);
  47. void     DoHighLevelEventExtension(const EventRecord *er);
  48. void     GrabAndDoEvent(void);
  49.  
  50. // EXTERNAL PROTOTYPES
  51. extern     OSErr DoAllPeriodicProcessing(void);
  52.  
  53.  
  54.  
  55. // EXTERNAL DEFINES
  56. extern Boolean    gExitNow;
  57. extern long     gSleepTicks;
  58.  
  59.  
  60. #endif  //__EVENTROUTINES__
  61.